package com.example.mywike.test;

import com.example.mywike.utils.returnUtils.ReturnData;
import com.example.mywike.utils.returnUtils.ReturnUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author xiyanqiulvgui
 * @Date 2020/11/8 12:38
 * @Description 测试restful方法
 * @Version 1.0.0
 */
@RestController
@RequestMapping("/restful")
public class Restful {

    @GetMapping("testGet/{pa}&{pam}")
    public ReturnData testGet(@PathVariable String pa, @PathVariable String pam){

        return ReturnUtils.success(pa+pam);
    }

    @GetMapping("testGe/{pa}/{pam}")
    public ReturnData testGe(@PathVariable(name = "pa") String pa, @PathVariable(name = "pam") String pam){

        return ReturnUtils.success(pa+pam);
    }


}
